package cn.tedu.ivos.audit.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
import java.util.List;

//简单来说：swagger2 => swagger3的时候出现了破坏性的更新
//将@ApiModelProperty 替换为了@shema字段。
//所以，当使用knife4j的最新版本的时候，调用@ApiModelProperty无法成功绑定。
//
//包的位置import io.swagger.v3.oas.annotations.media.Schema;
//替换即可实现之前@ApiModelProperty的功能
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AuditVO {
    @Schema(description = "审批单id")
    private Long id;
    @Schema(description = "申请单id")
    private Long applicationId;
    @Schema(description = "审批人id")
    private Long auditUserId;
    @Schema(description = "审批状态")
    private String auditStatus;
    @Schema(description = "审批排序")
    private Integer auditSort;
    //后面的字段直接复制ApplicationVO的字段,因为需要在调度审核里显示申请单的详细数据
    @Schema(description = "申请人id")
    private Long userId;
    @Schema(description = "申请人姓名")
    private String username;
    @Schema(description = "用车开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date startTime;
    @Schema(description = "用车结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date endTime;
    @Schema(description = "驾照图片")
    private String imgUrl;
    @Schema(description = "出发地")
    private String departureAddr;
    @Schema(description = "目的地")
    private String destinationAddr;
    @Schema(description = "申请原因")
    private String reason;
    @Schema(description = "备注")
    private String remark;
    @Schema(description = "申请单状态")
    private String status;
    @Schema(description = "分配车辆id")
    private Long vehicleId;
    @Schema(description = "驳回原因")
    private String rejectReason;
    @Schema(description = "审批人id集合")
    private List<Long> auditUserIdList;//[106,103]
    @Schema(description = "审批人姓名,字符串分隔")
    private String auditUsernameList;//"moly,tom"
}
